package com.feng.seata.service;

import com.feng.seata.mapper.ProductMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class ProductService {

    @Resource
    private ProductMapper productMapper;

    @Transactional(rollbackFor = Exception.class)
    public void minusStock(Integer buyNum) {
        productMapper.minusStock(buyNum);
    }
}
